/**
 * @desc    图片相关 包含 目录和图片
 * @author  刘贺[of2220]
 * @company qianmi.com
 * @Date    2017/2/10
 */
'use strict';
import * as mongoose from 'mongoose';

//创建集合模式
let RelatedImgInfoSchema = new mongoose.Schema({
  id: { type: String, unique: true, required: true }, //目录ID           /       图片ID
  name: { type: String, required: true }, //目录名称          /       图片名称
  pid: { type: String, required: true }, //所属父级目录ID    /        图片所属目录ID
  isCate: { type: Boolean, required: true }, //是否是目录 true   /       false
  src: String, //图片路径
  des: String, //图片描述
  keyword: [String], //图片关键字
  fileSize: String,
  imgSize: String,
  uploadTime: String
});

//导出模型
export default mongoose.model('RelatedImgInfo', RelatedImgInfoSchema);
